<?
include_once("../conn.php");

if(isset($submit) && $submit == 'Update')
{
	$q1 = "update job_plan set
		PlanName = \"$PlanName\",
		postings = \"$postings\",
		reviews = \"$reviews\",
		price = \"$price\"

		where PlanID = \"$PlanID\"";
	mysql_query($q1) or die(mysql_error());

	header("location:eprices.php");
	exit();
}
else
{
	include_once "accesscontrol.php";
	include_once "index.php";

	$q2 = "select * from job_plan where PlanID = \"$PlanID\"";
	$r2 = mysql_query($q2) or die(mysql_error());
	$a2 = mysql_fetch_array($r2);

?>
<br>
<form method=post>
<table align=center width=300>
<caption class=HeaderClass> Edit employers plan <b>"<?=$a2[PlanName]?>"</b></caption>
<tr>
	<td align=right><b> Plan name:</b></td>
	<td>&nbsp;&nbsp;<input type=text name=PlanName value="<?=$a2[PlanName]?>"></td>
</tr>

<tr>
	<td align=right><b>Postings: </b></td>
	<td>&nbsp;&nbsp;<input type=text name=postings size=5 value="<?=$a2[postings]?>"></td>
</tr>

<tr>
	<td align=right><b> Reviews: </b></td>
	<td>&nbsp;&nbsp;<input type=text name=reviews size=5 value="<?=$a2[reviews]?>"></td>
</tr>

<tr>
	<td align=right><b> Price: </b></td>
	<td><b>$</b><input type=text name=price size=5 value="<?=$a2[price]?>"></td>
</tr>

<tr>
	<td></td>

	<td>&nbsp;
		<input type=submit name=submit value=Update>
		<input type=hidden name=OldName value="<?=$a2[PlanName]?>">
	</td>
</tr>

</table>
</form>
<?
}
?>
<? include_once('../footer.php'); ?>